package com.junxonline.instant.dao.entity.model.logDevice;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 终端推送日志表实体类
 *
 * @author JunX
 * @date 2021-11-03
 */
@Data
@TableName(value = "th_log_push")
public class LogDevicePush implements Serializable {

    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    /**
     * 指令类型
     */
    @TableField(value = "type")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer type;

    /**
     * 终端编号
     */
    @TableField(value = "terminal_code")
    private String terminalCode;

    /**
     * 推送结果
     */
    @TableField(value = "status")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer status;

    /**
     * 推送参数
     */
    @TableField(value = "params")
    private String params;

    /**
     * 推送时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 组织机构ID
     */
    @TableField(value = "organization_id")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long organizationId;

    /**
     * 推送人ID
     */
    @TableField(value = "create_id")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long createId;

    /**
     * 所属机构
     */
    @TableField(exist = false)
    private String organizationName;

    /**
     * 推送人
     */
    @TableField(exist = false)
    private String createName;

}
